package com.xj.oop1;

public class PersonDemo {
    public static void main(String[] args) {
        //当new一个对象的时候，会先调用其父类的构造方法，再调用自己的构造方法
        Teacher teacher = new Teacher();
        teacher.name = "帅";
        teacher.age = 20;
        teacher.setEdu("本科");
        teacher.setPos("主管");
        teacher.intro();

        Student student = new Student();
        student.name = "小佳";
        student.age = 17;
        student.setScore(100);
        student.intro();
    }
}
